#ifndef _FILE_H_
#define _FILE_H_

#include <stdio.h>

#define FILE_READ	0x01
#define FILE_WRITE	0x02

class CFile
{
private:
	FILE *m_file;


	s32 m_size;
	s32 m_pos;
	CFile();
public:

	static CFile* Open(char* fname, s32 flags);
	~CFile();

	s32 GetSize() {return m_size;}
	s32 GetPos() {return m_pos;}

	s32 Read(void* ptr, s32 count);
	s32 Write(void* ptr, s32 count);
	void Flush();
	void Close();
};

#endif //_FILE_H_
